package com.cgbl.cg.vm.mine

import android.app.Application
import androidx.databinding.ObservableField
import com.robot.base.base.vm.GLBaseViewModel
import me.goldze.mvvmhabit.binding.command.BindingAction
import me.goldze.mvvmhabit.binding.command.BindingCommand
import me.goldze.mvvmhabit.bus.event.SingleLiveEvent

class PersonalProfileViewModel(application: Application) : GLBaseViewModel(application) {

    val uc = UiChangeEvent()

    val clickUpdateUserNameCommand = BindingCommand<Any>(BindingAction {
        uc.showUpdateUserName.postValue("")
    })

    val clickUpdateGenderCommand = BindingCommand<Any>(BindingAction {
        uc.showUpdateGender.postValue("")
    })

    val clickUpdateJobCommand = BindingCommand<Any>(BindingAction {
        uc.showUpdateJob.postValue("")
    })

    val clickUpdateSignatureCommand = BindingCommand<Any>(BindingAction {
        uc.showUpdateSignature.postValue("")
    })
    val clickUpdateBirthdayCommand = BindingCommand<Any>(BindingAction {
        uc.showUpdateBirthday.postValue("")
    })
    val clickUpdateAddressCommand = BindingCommand<Any>(BindingAction {
        uc.showUpdateAddress.postValue("")
    })
    val userAvatar = ObservableField<String>()

    init {
        userAvatar.set("https://ep.watsons.com.cn/MPOSImage/3456_sco_home_pic.png")
    }
    class UiChangeEvent {
        val showUpdateUserName: SingleLiveEvent<String> = SingleLiveEvent()

        val showUpdateGender: SingleLiveEvent<String> = SingleLiveEvent()

        val showUpdateJob: SingleLiveEvent<String> = SingleLiveEvent()

        val showUpdateSignature: SingleLiveEvent<String> = SingleLiveEvent()

        val showUpdateBirthday: SingleLiveEvent<String> = SingleLiveEvent()

        val showUpdateAddress: SingleLiveEvent<String> = SingleLiveEvent()


    }


}